import service from '@/utils/http';
import { ApiBase } from '@/types/api/apiBase';
import { AxiosPromise } from 'axios';

export function fetchEditMiner(
  mid: number,
  mac: string,
  name: string,
): AxiosPromise<ApiBase<null>> {
  return service('/web_miner/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
    data: {
      mid,
      mac,
      name,
    },
  });
}
